#include "include/LocalIDGenerator.h"

namespace qb
{
	uint32_t CLocalIDGenerator::GenerateMessageSeq()
	{
		static uint32_t uNextMessageSeq = 1;
		uint32_t uRetSeq = uNextMessageSeq;

		uNextMessageSeq += 1;
		if (uNextMessageSeq >= -1)
		{
			uNextMessageSeq = 1;
		}

		return uRetSeq;
	}

    uint32_t ShiftAmount::high32(uint64_t value)
    {
        return value >> sizeof(uint32_t)*8;
    }

    uint32_t ShiftAmount::low32(uint64_t value)
    {
        return (uint32_t)value;
    }
}
